/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "eme_diagnostico_ingreso")
@NamedQueries({
    @NamedQuery(name = "EmeDiagnosticoIngreso.findAll", query = "SELECT e FROM EmeDiagnosticoIngreso e")})
public class EmeDiagnosticoIngreso implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "edi_id")
    private Integer ediId;
    @Column(name = "edi_tipo")
    private Integer ediTipo;
    @Basic(optional = false)
    @Column(name = "edi_nombre")
    private String ediNombre;
    @JoinColumn(name = "eat_id", referencedColumnName = "eat_id")
    @ManyToOne(fetch = FetchType.LAZY)
    private EmeAtencion emeAtencion;

    public EmeDiagnosticoIngreso() {
    }

    public EmeDiagnosticoIngreso(Integer ediId) {
        this.ediId = ediId;
    }

    public EmeDiagnosticoIngreso(Integer ediId, String ediNombre) {
        this.ediId = ediId;
        this.ediNombre = ediNombre;
    }

    public Integer getEdiId() {
        return ediId;
    }

    public void setEdiId(Integer ediId) {
        this.ediId = ediId;
    }

    public Integer getEdiTipo() {
        return ediTipo;
    }

    public void setEdiTipo(Integer ediTipo) {
        this.ediTipo = ediTipo;
    }

    public String getEdiNombre() {
        return ediNombre;
    }

    public void setEdiNombre(String ediNombre) {
        this.ediNombre = ediNombre;
    }

    public EmeAtencion getEmeAtencion() {
        return emeAtencion;
    }

    public void setEmeAtencion(EmeAtencion emeAtencion) {
        this.emeAtencion = emeAtencion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ediId != null ? ediId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EmeDiagnosticoIngreso)) {
            return false;
        }
        EmeDiagnosticoIngreso other = (EmeDiagnosticoIngreso) object;
        if ((this.ediId == null && other.ediId != null) || (this.ediId != null && !this.ediId.equals(other.ediId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "newpackage.EmeDiagnosticoIngreso[ ediId=" + ediId + " ]";
    }
    
}
